Skip to content

Conversation

@cdoublev
Copy link
Collaborator

The attribute change steps for Element.style, and the procedure for creating a new CSSStyleDeclaration, are receiving declarations from parse a CSS declaration block, in undefined order.

https://drafts.csswg.org/cssom-1/#css-declaration-blocks

A CSS declaration block has these attribute change steps [...]:

[...]

  1. Otherwise, let the declarations be the result of parse a CSS declaration block from a string value.

When a CSS declaration block object is created, then:

[...]

If value is not null, let the declarations be the result of parse a CSS declaration block from a string value.

Declarations should be in specified order, which I propose to apply in parse a CSS declaration block.

@cdoublev
Copy link
Collaborator Author

cdoublev commented Jan 22, 2024

Actually consume a block's contents (CSS Syntax) now filters invalid declarations in the context, so it should also be responsible of applying the specified order, and the steps of parse a CSS declaration block should only be returning the declarations from the result of parse a block's contents.

(edit: fixed) I do not know how to create a link to specified order in CSSOM from CSS Syntax, so I mark this PR as a draft.

@cdoublev cdoublev marked this pull request as draft January 22, 2024 13:41
@cdoublev cdoublev changed the title [cssom-1] Return declarations in specified order from parse a CSS dec… [css-syntax-3] Return declarations in specified order from parse a CSS dec… Jan 22, 2024
@cdoublev cdoublev changed the title [css-syntax-3] Return declarations in specified order from parse a CSS dec… [css-syntax-3] Return declarations in specified order Jan 22, 2024
@cdoublev cdoublev changed the title [css-syntax-3] Return declarations in specified order [css-syntax-3][cssom-1] Return declarations in specified order Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant